home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
ppagemod.zip
/
PPE-PAGE.PPS
< prev
next >
Wrap
Text File
|
1993-05-17
|
12KB
|
308 lines
;*****************************************************************************
;* *
;* PPE-PAGE v1.00b *
;* PCBOARD 15.0 OPERATOR PAGE PPE PROGRAM *
;* *
;* Written by Larry Steele and Jerry Claxton *
;* Written in PCBoard Programming Language *
;* Compiled on 05-03-1993 *
;* *
;* Modifications by Phillip J. White *
;* Modified on 05-16-1993 *
;* *
;* "The Shoppe Bulletin Board Systems" *
;* Node 1 - 708-888-0725 - [16.8 DS] - 80486/50 *
;* Node 2 - 708-888-1162 - [16.8 DS] - 80486/40 *
;* Node 3 - 708-888-0078 - [16.8 DS] - 80486/40 *
;* Node 4 - 708-888-4175 - [16.8 DS] - 80486/40 *
;* Node 5 - PRIVATE LINE - [16.8 DS] - 80486/66 *
;*****************************************************************************
;*****************************************************************************
;* Define variable types *
;*****************************************************************************
INTEGER DotCount, SecLowLevel, SecHighLevel, XColumn, YRow
INTEGER TotalUsers, Lp, AbortFlag, TotalReasons ;, SoundCount
STRING PageConfigFile, PageTrashCanFile, PageWelcomeFile, PageCommentFile
STRING PageReasonFile, BadReasonFile
STRING BeginTimeString, EndingTimeString, PageDayString, TrashCanUser(250)
STRING RingSpeed, ReasonChat(250)
STRING Answer, Reason, KeyPress, PageAmount
TIME BeginTime, EndingTime, CurrentTime
;*****************************************************************************
;* Parse out the configuration file from the command line. Open the file so *
;* we can grab all the information needed to run the program. *
;*****************************************************************************
;GETTOKEN PageConfigFile
IF (EXIST(PPEPATH() + "PPE-PAGE.CNF") = 0) THEN
PRINTLN
PRINTLN "ERROR: File " + PageConfigFile + " not found! Please nodify SysOp..."
PRINTLN
WAIT
END
END IF
FOPEN 1, PPEPATH() + "PPE-PAGE.CNF", O_RD, S_DN
FGET 1, SecLowLevel
FGET 1, SecHighLevel
FGET 1, BeginTimeString
FGET 1, EndingTimeString
FGET 1, PageDayString
FGET 1, PageTrashCanFile
FGET 1, PageWelcomeFile
FGET 1, PageCommentFile
FGET 1, PageReasonFile
FGET 1, BadReasonFile
FGET 1, PageAmount
FGET 1, RingSpeed
FCLOSE 1
;*****************************************************************************
;* Get Information from PCBOARD.SYS for this caller *
;* Write some information to the callerlog *
;*****************************************************************************
GETUSER
LOG U_NAME() + " (" + STRING(U_SEC) + ") SysOp Page at (" + LEFT(STRING(TIME()), 5) + ")", 0
;*****************************************************************************
;* Below we read the PCAN file for a list of users we DON'T won't to be able *
;* to page for the SysOp. *
;*****************************************************************************
IF (EXIST(PageTrashCanFile) > 0) THEN
FOPEN 1, PageTrashCanFile, O_RD, S_DN
FGET 1, TotalUsers
FOR Lp = 1 TO TotalUsers
FGET 1, TrashCanUser(Lp)
IF (U_NAME() = UPPER(TrashCanUser(Lp))) GOTO WRONG_USER
NEXT Lp
FCLOSE 1
END IF
;*****************************************************************************
; Get the current system TIME *
; *
; If time is in HH:MM format adjust to HH:MM:SS or they won't work right *
; then convert from STRING TIME to INTEGER TIME. *
;*****************************************************************************
CurrentTime = TIME()
IF (LEN(BeginTimeString) = 5) LET BeginTimeString = BeginTimeString + ":00"
IF (LEN(EndingTimeString) = 5) LET EndingTimeString = EndingTimeString + ":00"
PageDayString = LEFT(PageDayString + "YYYYYYY", 7)
BeginTime = BeginTimeString
EndingTime = EndingTimeString
;*****************************************************************************
; Check the users current security level against command line security level *
; Check to see if START TIME is before END TIME. *
;*****************************************************************************
IF (U_SEC < SecLowLevel | U_SEC > SecHighLevel) GOTO WRONG_SECURITY
IF ((BeginTime <= EndingTime) & (BeginTime <> 0) & (EndingTime <> 0)) THEN
IF (CurrentTime < BeginTime | CurrentTime > EndingTime) GOTO WRONG_TIMES
ELSE
IF (CurrentTime < BeginTime & CurrentTime > EndingTime) GOTO WRONG_TIMES
END IF
IF (UPPER(MID(PageDayString, DOW(DATE()) + 1, 1)) = "N") GOTO WRONG_DAY
;*****************************************************************************
; Start of Main PPE-PAGE.PPE *
;*****************************************************************************
CLS
IF (EXIST(PageWelcomeFile)) THEN
DISPFILE PageWelcomeFile, LANG + SEC + GRAPH
ELSE
PRINTLN "@X70┌────────────────────────────────────────────────────────────────────────────@X7F┐@X07"
PRINTLN "@X70│ @X75* @X74PCBOARD @X75* @X70==@X71 O P E R A T O R P A G E @X70== @X75* @X74PCBOARD @X75* @X7F│@X07"
PRINTLN "@X70└@X7F────────────────────────────────────────────────────────────────────────────┘@X07"
END IF
PRINTLN
INPUTTEXT "Why do you want to page the SysOp", Reason, 0Eh, 43
IF (EXIST(PageReasonFile) > 0) THEN
FOPEN 1, PageReasonFile, O_RD, S_DN
FGET 1, TotalReasons
FOR Lp = 1 TO TotalReasons
FGET 1, ReasonChat(Lp)
IF (Reason = UPPER(ReasonChat(Lp))) GOTO BADREASON
IF (Reason = LOWER(ReasonChat(Lp))) GOTO BADREASON
IF (Reason = ReasonChat(Lp)) GOTO BADREASON
NEXT Lp
FCLOSE 1
IF ((Reason = "") | (LEN(Reason) <= 3)) GOTO ABORT_PAGE
IF (Reason <> "") GOSUB DISPLAY_BBSSIDE
END IF
LOG "Reason: " + Reason, 0
CurrentTime = TIME()
NEWLINES 2
PRINT "@X0EPage ends in "+ PageAmount +" seconds. @X0C(@X0ECtrl-K@X0C) @X0EAborts @X0F."
WHILE ((CurrentTime + PageAmount) > TIME()) DO
AbortFlag = (ABORT())
IF (AbortFlag) GOTO USER_ABORT_PAGE
KeyPress = KINKEY()
IF (KeyPress = CHR(32)) GOTO SYSOP_CHAT
DotCount = DotCount + 1
IF ((DotCount % RingSpeed) == 0) THEN
PRINT "@X0F."
; SoundCount = SoundCount + 1
; IF ((SoundCount % 2) == 0) THEN
PRINT "@X09."
SOUND (1100)
DELAY (8)
SOUND (800)
DELAY (6)
; END IF
SOUND (0)
END IF
ENDWHILE
IF (PAGESTAT() = 0) PAGEON
GOTO NOT_HOME
;*****************************************************************************
; End of Main PPE-PAGE.PPE *
;*****************************************************************************
END
;*****************************************************************************
; This is all the GOTO and GOSUB LABELS *
;*****************************************************************************
:DISPLAY_BBSSIDE
WRUNET PCBNODE(), "Paging SysOp", U_NAME(), U_CITY, "", ""
XColumn = GETX()
YRow = GETY()
ANSIPOS 1, 1
COLOR 63
SPRINTLN "┌────────────────────────────────────────────────────────────────────────────┐"
SPRINTLN "│ [SysOp] - Press (SPACE) to acknowledge Operator Page, (ESC) when finished. │"
SPRINTLN "└────────────────────────────────────────────────────────────────────────────┘"
COLOR DEFCOLOR()
ANSIPOS XColumn, YRow
RETURN
:NOT_HOME
NEWLINES 2
IF (EXIST(PageCommentFile)) THEN
DISPFILE PageCommentFile, LANG + SEC + GRAPH
ELSE
PRINTLN "@X0CSorry, the Sysop is not currently available for CHAT!"
END IF
GOTO PROMPT_USER
:WRONG_USER
FCLOSE 1
PRINTLN
PRINTLN "@X0CSorry, the Sysop is not currently available for CHAT!"
GOTO PROMPT_USER
:WRONG_SECURITY
PRINTLN
PRINTLN "@X0ESorry, insufficient Security to page for SysOp!"
GOTO PROMPT_USER
:WRONG_TIMES
PRINTLN
PRINTLN "@X70┌────────────────────────────────────────────────────────────────────────────@X7F┐@X07"
PRINTLN "@X70│ @X71Sorry, @FIRST@, you may only PAGE for the SysOp in the HOURS listed below:@POS:78@@X7F│@X07"
PRINTLN "@X70└@X7F────────────────────────────────────────────────────────────────────────────┘@X07"
PRINTLN
PRINTLN "@X70┌────────────────────────────────────────────────────────────────────────────@X7F┐@X07"
PRINTLN "@X70│ @X74Beginning Time: @X7E" + STRING(BeginTime) + " am @X74Ending Time: @X7E" + STRING(EndingTime) + " pm @X7F│@X07"
PRINTLN "@X70└@X7F────────────────────────────────────────────────────────────────────────────┘@X07"
GOTO PROMPT_USER
:WRONG_DAY
PRINTLN
PRINTLN "@X70┌────────────────────────────────────────────────────────────────────────────@X7F┐@X07"
PRINTLN "@X70│ @X71Sorry, @FIRST@, you may only PAGE for the SysOp in the DAYS listed below: @POS:78@@X7F│@X07"
PRINTLN "@X70└@X7F────────────────────────────────────────────────────────────────────────────┘@X07"
PRINTLN
PRINTLN "@X07@X70┌────────────────────────────────────────────────────────────────────────────@X7F┐@X07"
PRINTLN "@X70│ @X74SUN@X70=@X71" + MID(PageDayString, 1, 1) + " @X74MON@X70=@X71" + MID(PageDayString, 2, 1) + " @X74TUE@X70=@X71" + MID(PageDayString, 3, 1) + " @X74WED@X70=@X71" + MID(PageDayString, 4, 1) + " @X74THU@X70=@X71" + MID(PageDayString, 5, 1) + " @X74FRI@X70=@X71" + MID(PageDayString, 6, 1) + " @X74SAT@X70=@X71" + MID(PageDayString, 7, 1) + " @X7F│@X07"
PRINTLN "@X70└@X7F────────────────────────────────────────────────────────────────────────────┘@X07"
GOTO PROMPT_USER
:PROMPT_USER
PRINTLN
INPUTYN "Would you like to leave a comment to the Sysop instead Y/N", Answer, 0Ah
IF (Answer <> YESCHAR()) STOP
KBDSTUFF "C" + CHR(13) + "Y" + CHR(13)
END
:SYSOP_CHAT
CHAT
END
:BADREASON
CLS
IF (EXIST(BadReasonFile)) THEN
DISPFILE BadReasonFile, LANG + SEC + GRAPH
ELSE
PRINTLN CHR(07)+CHR(07)+CHR(07)
PRINTLN "@X40┌─────────────────────────────────────────────────────────────────────────────@X4C┐@X07"
PRINTLN "@X40│ @X4EThe Reason you gave for paging the SysOp is NOT @X4C│@X07"
PRINTLN "@X40│ @X4EAcceptable! @X4C│@X07"
PRINTLN "@X40│ @X4C │@X07"
PRINTLN "@X40│ @X40PAGE ABORTED... @X4C│@X07"
PRINTLN "@X40│ @X4C│@X07"
PRINTLN "@X40└@X4C─────────────────────────────────────────────────────────────────────────────┘@X07"
END IF
PRINTLN
END
:ABORT_PAGE
END
:USER_ABORT_PAGE
RESETDISP
IF (PAGESTAT() = 0) PAGEON
NEWLINES 1
END